@echo off
title Deploying Soybean...
echo Deploying Soybean...

cd .\k8s\test

echo.
echo "Image Build.............."
docker build -t regwmsuat.azurecr.io/nimbus/ui-soy:latest .

echo.
echo "Image Push.............."
docker push regwmsuat.azurecr.io/nimbus/ui-soy:latest

echo.
echo "K8s Deploy.............."
kubectl apply -f .\deployment.yml
kubectl rollout restart deployment deployment-ui-soy -n nimbus
timeout /nobreak /t 5

echo.
echo "Delete Image.............."
docker rmi regwmsuat.azurecr.io/nimbus/ui-soy:latest
pause
